package com.songminju.jsong_httpserver.server;

import com.songminju.jsong_httpserver.HttpServerConfig;
import com.songminju.jsong_httpserver.httpServer;

public abstract class AbstractHttpServer implements httpServer {

	protected HttpServerConfig config;
	
	public AbstractHttpServer(HttpServerConfig config) {
		//使用config的copy,防止多个server使用同一个config生成而相互影响
		try {
			this.config = (HttpServerConfig)config.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
	}
	
	@Override
	public abstract void startSync() throws Exception ;

}
